import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../pages/Login'
import Register from '../pages/Register'
import Manager from '../pages/Manager'
import Class from '../pages/Class'
import Student from '../pages/Student'
import Course from '../pages/Course'
import Test from '../pages/Test'
Vue.use(VueRouter)

const routes =[
   {path:'/test',component:Test},
   {path:'/login',component:Login},
   {path:'/register',component:Register},
//    嵌套实现路由
   {path:'/manager',component:Manager
   ,children:[
       {path:'/manager/class',component:Class},
       {path:'/manager/student',component:Student},
       {path:'/manager/course',component:Course}
   ]
},
]
export default new VueRouter({
   mode:'history',
   routes
})
